<div class="page_header">
	<h1><?php echo $total; ?> Actualité(s)</h1>
</div>
<ol class="breadcrumb">
  <li><a href="<?php echo Router::url('admin'); ?>">Accueil</a></li>
  <li class="active">Gestion des actualités</li>
</ol>
<table class="table table-striped" >
	<thead>
		<tr>
			<th class="text-center">Id</th>
			<th class="text-center">En ligne ?</th>
			<th class="text-center">Titre</th>
			<th class="text-center">Actions</th>
		</tr>
	</thead>
	<tbody class="text-center"><?php foreach ($actus as $k => $v): ?>
			<tr>
				<td><?php echo $v->id; ?></td>
				<td><span class="label label-<?php echo ($v->online==1)?'success':'default'; ?> "><?php echo($v->online==1)?'En ligne':'Hors ligne'; ?></span></td>
				<td><?php echo $v->titre; ?></td>
				<td>
					<a class="btn btn-default btn-sm active" role="button" href="<?php echo Router::url('admin/actus/edit/'.$v->id); ?>">Editer</a>
					<a class="btn btn-default btn-sm active" role="button" onclick="return confirm('Voulez-vous vraiment supprimer ce contenu ?');" href="<?php echo Router::url('admin/actus/delete/'.$v->id); ?>">Supprimer</a>
				</td>
			</tr><?php endforeach ?>
	</tbody>
</table>
<div class="col-md-6" style="text-align:left">
	<a href="<?php echo Router::url('admin/actus/edit'); ?>" class="btn btn-primary active" role="button">Ajouter une actualité</a> 
</div>
<div class="col-md-6" style="text-align:right">
	<div>
	<ul class="pagination" style="">
		<?php for ($i=1; $i <= $page; $i++): ?>
		<li <?php if($i==$this->request->page) echo 'class="active"'; ?>><a href="?page=<?php echo $i ?>"><?php echo $i ?></a></li>
	<?php endfor; ?>
	</ul>
</div>
</div> 